package com.bgs.engineering.api.sysUser.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bgs.engineering.api.sysUser.entiy.SysUser;
import org.apache.ibatis.annotations.Select;

/**
 * @ClassName SysUserMapper
 * @Description TODO
 * @Author zcy
 * @Date 2023/3/27 10:46
 **/
public interface SysUserMapper extends BaseMapper<SysUser> {
    @Select("SELECT u.*,ur.role_id roleId FROM sys_user u LEFT JOIN sys_user_role ur ON ur.user_id = u.id WHERE u.user_flag = 0 AND login_name = #{loginName}")
    SysUser getUserByLoginName(String loginName);
}
